package com.shop.shoporder.mapper.order;


import com.shop.shoporder.entity.order.Cart;
import com.shop.shoporder.entity.order.CartList;
import com.shop.shoporder.entity.order.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface CartMapper {
    int deleteByPrimaryKey(Integer cartId);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer cartId);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    //Cart selectCartByProductIDAndGuigeID(Cart record);

    Cart selectCartIsExist(Cart record);
    List<CartList> selectCartList(Cart cart);
    List<CartList> selectOrderList(Order order);
    List<Cart> getOrderCommentGoodsList(@Param("usernoId")int usernoId,@Param("type")Integer type,@Param("productId")int productId);
    List<CartList> selectCartListByOrderNo(@Param("usernoId")int usernoId,@Param("orderNo")String orderNo);
    List<CartList> selectCartListSureOrder(@Param("userNoId") int usernoId,@Param("cartIdsList") List<String> cartIdsList);
    int upCartStatus(@Param("orderNo") String orderNo,@Param("cartIdsList") List<String> cartIdsList);
    int upCartFrom(@Param("remark4") Date remark4, @Param("cartIdsList") List<String> cartIdsList);
    int upCartLogType(@Param("cartIdsList") List<String> cartIdsList,@Param("logisticsType")int logisticsType);
    List<Cart> selectListByOrderNo(String orderNo);
    int updateLogByOrderNo(@Param("logisticalNo") String logisticalNo, @Param("orderList") List<String> orderList);
    int updateStateByOrderNo(@Param("orderList") List<String> orderList);
}